const CracoLessPlugin = require("craco-less");
const path = require("path");
module.exports = {
  // antd定义主题色
  plugins: [
    {
      plugin: CracoLessPlugin,
      options: {
        lessLoaderOptions: {
          lessOptions: {
            //自定义主题色(橙色)
            modifyVars: { "@primary-color": "#FF8D1A" },
            javascriptEnabled: true,
          },
        },
      },
    },
  ],
  //antd组件样式按需引入
  babel: {
    plugins: [
      [
        "import",
        {
          libraryName: "antd",
          libraryDirectory: "es",
          style: true,
        },
      ],
    ],
  },
  webpack:{
    alias:{
      "@": path.resolve(__dirname, "src"),
    }
  }
};
